package com.sqsf.javabean;

import java.util.List;

public class User {
    private int uid;
    private String username;
    private String password;
    private String phone;
//    private int rid;
//    private String name;
//    private String desc;
//
//    public int getRid() {
//        return rid;
//    }
//
//    public void setRid(int rid) {
//        this.rid = rid;
//    }
//
//    public String getName() {
//        return name;
//    }
//
//    public void setName(String name) {
//        this.name = name;
//    }
//
//    public String getDesc() {
//        return desc;
//    }
//
//    public void setDesc(String desc) {
//        this.desc = desc;
//    }
    //直接定义对应的属性确实可以存入数据 但是 与mybatisROM原则不符
    //rid name desc应该是Role表的数据 也就是说应该使用Role对象存储
    //应该以自定义对象的形式声明指定属性
    private Role r;

    public User() {
    }

    public Role getR() {
        return r;
    }

    public void setR(Role r) {
        this.r = r;
    }

    public int getUid() {
        return uid;
    }

    public void setUid(int uid) {
        this.uid = uid;
    }

    public String getUsername() {
        return username;
    }

    public void setUsername(String username) {
        this.username = username;
    }

    public String getPassword() {
        return password;
    }

    public void setPassword(String password) {
        this.password = password;
    }

    public String getPhone() {
        return phone;
    }

    public void setPhone(String phone) {
        this.phone = phone;
    }

    @Override
    public String toString() {
        return "User{" +
                "uid=" + uid +
                ", username='" + username + '\'' +
                ", password='" + password + '\'' +
                ", phone='" + phone + '\'' +
                ", r=" + r +
                '}';
    }
}
